{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 等额本金\n",
    "- 总贷款额 $A$\n",
    "- 月利率 $\\beta$\n",
    "- 总期数（月）：$m$\n",
    "月还款额：$$X=\\frac{A\\beta(1+\\beta)^{m}}{(1+\\beta)^{m}-1}$$\n",
    "\n",
    "第一个月还款利息（interest）：$lx_1=A\\beta$<br>\n",
    "第一个月还款本金（principal）：$bj_1 = X - interest_1$<br>\n",
    "第一个月剩余本金：$A_1 = A - bj_1$<br>\n",
    "第 $i$ 个月利息：$lx_i = A_{i-1} \\beta$\n",
    "\n",
    "以此类推"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "from pandas import Series, DataFrame"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "A = 840000\n",
    "base_rate = 4.66\n",
    "discount = 95\n",
    "n_years = 30"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "def calcu_x(A,base_rate=4.90,n_years=30,discount=100):\n",
    "    '''总贷款数（元），年基准利率（%），利率折扣（%），贷款年限'''\n",
    "    beta = base_rate/100 * discount/100 /12\n",
    "    m = 12* n_years\n",
    "    X = (A*beta*(1+beta)**m)/((1+beta)**m-1)\n",
    "    \n",
    "    return X"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 222,
   "metadata": {},
   "outputs": [],
   "source": [
    "X1 = calcu_x(840000,4.66,30)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "metadata": {},
   "outputs": [],
   "source": [
    "X2= calcu_x(500000,3.25,15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 224,
   "metadata": {},
   "outputs": [],
   "source": [
    "lixi_1 =A * base_rate/100/12\n",
    "benjin_1 = X1 - lixi_1\n",
    "A1 = A - benjin_1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 229,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "dic_1 = {\"月供\":X1,\"月供本金\":benjin_1, \"月供利息\":lixi_1,\"本金余额\":A1}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 231,
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "df = None\n",
    "df = DataFrame(dic_1,index=[0])\n",
    "dic_last = dic_1\n",
    "for i in range(2,361):\n",
    "    lixi_new =dic_last[\"本金余额\"] * base_rate/100/12\n",
    "    benjin_new = X1 - lixi_new\n",
    "    A_new = dic_last[\"本金余额\"] - benjin_new\n",
    "    dic_new = {\"月供\":X1,\"月供本金\":benjin_new, \"月供利息\":lixi_new,\"本金余额\":A_new}\n",
    "    df = df.append(dic_new,ignore_index=True )\n",
    "    dic_last = dic_new"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 232,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style>\n",
       "    .dataframe thead tr:only-child th {\n",
       "        text-align: right;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: left;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>月供</th>\n",
       "      <th>月供利息</th>\n",
       "      <th>月供本金</th>\n",
       "      <th>本金余额</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3262.000000</td>\n",
       "      <td>1074.385128</td>\n",
       "      <td>8.389256e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3257.827804</td>\n",
       "      <td>1078.557324</td>\n",
       "      <td>8.378471e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3253.639407</td>\n",
       "      <td>1082.745722</td>\n",
       "      <td>8.367643e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3249.434744</td>\n",
       "      <td>1086.950384</td>\n",
       "      <td>8.356774e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3245.213754</td>\n",
       "      <td>1091.171375</td>\n",
       "      <td>8.345862e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3240.976371</td>\n",
       "      <td>1095.408757</td>\n",
       "      <td>8.334908e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3236.722534</td>\n",
       "      <td>1099.662594</td>\n",
       "      <td>8.323911e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3232.452178</td>\n",
       "      <td>1103.932951</td>\n",
       "      <td>8.312872e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3228.165238</td>\n",
       "      <td>1108.219890</td>\n",
       "      <td>8.301790e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3223.861651</td>\n",
       "      <td>1112.523478</td>\n",
       "      <td>8.290664e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3219.541351</td>\n",
       "      <td>1116.843777</td>\n",
       "      <td>8.279496e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3215.204275</td>\n",
       "      <td>1121.180854</td>\n",
       "      <td>8.268284e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3210.850356</td>\n",
       "      <td>1125.534773</td>\n",
       "      <td>8.257029e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3206.479529</td>\n",
       "      <td>1129.905599</td>\n",
       "      <td>8.245730e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3202.091729</td>\n",
       "      <td>1134.293399</td>\n",
       "      <td>8.234387e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3197.686890</td>\n",
       "      <td>1138.698239</td>\n",
       "      <td>8.223000e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3193.264945</td>\n",
       "      <td>1143.120184</td>\n",
       "      <td>8.211569e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3188.825828</td>\n",
       "      <td>1147.559300</td>\n",
       "      <td>8.200093e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3184.369473</td>\n",
       "      <td>1152.015656</td>\n",
       "      <td>8.188573e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3179.895812</td>\n",
       "      <td>1156.489316</td>\n",
       "      <td>8.177008e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3175.404778</td>\n",
       "      <td>1160.980350</td>\n",
       "      <td>8.165398e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3170.896305</td>\n",
       "      <td>1165.488824</td>\n",
       "      <td>8.153743e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3166.370323</td>\n",
       "      <td>1170.014805</td>\n",
       "      <td>8.142043e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3161.826766</td>\n",
       "      <td>1174.558363</td>\n",
       "      <td>8.130298e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3157.265564</td>\n",
       "      <td>1179.119564</td>\n",
       "      <td>8.118506e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3152.686650</td>\n",
       "      <td>1183.698479</td>\n",
       "      <td>8.106669e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3148.089954</td>\n",
       "      <td>1188.295174</td>\n",
       "      <td>8.094786e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3143.475408</td>\n",
       "      <td>1192.909721</td>\n",
       "      <td>8.082857e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3138.842942</td>\n",
       "      <td>1197.542187</td>\n",
       "      <td>8.070882e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>3134.192486</td>\n",
       "      <td>1202.192642</td>\n",
       "      <td>8.058860e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>330</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>476.000969</td>\n",
       "      <td>3860.384159</td>\n",
       "      <td>1.187150e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>331</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>461.009811</td>\n",
       "      <td>3875.375317</td>\n",
       "      <td>1.148396e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>332</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>445.960437</td>\n",
       "      <td>3890.424692</td>\n",
       "      <td>1.109492e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>333</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>430.852621</td>\n",
       "      <td>3905.532507</td>\n",
       "      <td>1.070436e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>334</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>415.686136</td>\n",
       "      <td>3920.698992</td>\n",
       "      <td>1.031229e+05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>335</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>400.460755</td>\n",
       "      <td>3935.924373</td>\n",
       "      <td>9.918702e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>336</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>385.176249</td>\n",
       "      <td>3951.208879</td>\n",
       "      <td>9.523581e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>337</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>369.832388</td>\n",
       "      <td>3966.552741</td>\n",
       "      <td>9.126926e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>338</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>354.428941</td>\n",
       "      <td>3981.956187</td>\n",
       "      <td>8.728730e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>339</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>338.965678</td>\n",
       "      <td>3997.419450</td>\n",
       "      <td>8.328988e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>340</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>323.442366</td>\n",
       "      <td>4012.942762</td>\n",
       "      <td>7.927694e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>341</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>307.858772</td>\n",
       "      <td>4028.526357</td>\n",
       "      <td>7.524841e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>342</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>292.214661</td>\n",
       "      <td>4044.170467</td>\n",
       "      <td>7.120424e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>343</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>276.509799</td>\n",
       "      <td>4059.875329</td>\n",
       "      <td>6.714436e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>344</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>260.743950</td>\n",
       "      <td>4075.641179</td>\n",
       "      <td>6.306872e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>345</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>244.916876</td>\n",
       "      <td>4091.468252</td>\n",
       "      <td>5.897726e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>346</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>229.028341</td>\n",
       "      <td>4107.356787</td>\n",
       "      <td>5.486990e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>347</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>213.078106</td>\n",
       "      <td>4123.307022</td>\n",
       "      <td>5.074659e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>348</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>197.065930</td>\n",
       "      <td>4139.319198</td>\n",
       "      <td>4.660727e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>349</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>180.991574</td>\n",
       "      <td>4155.393554</td>\n",
       "      <td>4.245188e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>350</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>164.854796</td>\n",
       "      <td>4171.530333</td>\n",
       "      <td>3.828035e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>351</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>148.655353</td>\n",
       "      <td>4187.729775</td>\n",
       "      <td>3.409262e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>352</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>132.393002</td>\n",
       "      <td>4203.992126</td>\n",
       "      <td>2.988863e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>353</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>116.067500</td>\n",
       "      <td>4220.317629</td>\n",
       "      <td>2.566831e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>354</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>99.678599</td>\n",
       "      <td>4236.706529</td>\n",
       "      <td>2.143160e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>355</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>83.226056</td>\n",
       "      <td>4253.159073</td>\n",
       "      <td>1.717844e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>356</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>66.709621</td>\n",
       "      <td>4269.675507</td>\n",
       "      <td>1.290877e+04</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>357</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>50.129048</td>\n",
       "      <td>4286.256080</td>\n",
       "      <td>8.622512e+03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>358</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>33.484087</td>\n",
       "      <td>4302.901041</td>\n",
       "      <td>4.319611e+03</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>359</th>\n",
       "      <td>4336.385128</td>\n",
       "      <td>16.774488</td>\n",
       "      <td>4319.610640</td>\n",
       "      <td>-3.846890e-08</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>360 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "              月供         月供利息         月供本金          本金余额\n",
       "0    4336.385128  3262.000000  1074.385128  8.389256e+05\n",
       "1    4336.385128  3257.827804  1078.557324  8.378471e+05\n",
       "2    4336.385128  3253.639407  1082.745722  8.367643e+05\n",
       "3    4336.385128  3249.434744  1086.950384  8.356774e+05\n",
       "4    4336.385128  3245.213754  1091.171375  8.345862e+05\n",
       "5    4336.385128  3240.976371  1095.408757  8.334908e+05\n",
       "6    4336.385128  3236.722534  1099.662594  8.323911e+05\n",
       "7    4336.385128  3232.452178  1103.932951  8.312872e+05\n",
       "8    4336.385128  3228.165238  1108.219890  8.301790e+05\n",
       "9    4336.385128  3223.861651  1112.523478  8.290664e+05\n",
       "10   4336.385128  3219.541351  1116.843777  8.279496e+05\n",
       "11   4336.385128  3215.204275  1121.180854  8.268284e+05\n",
       "12   4336.385128  3210.850356  1125.534773  8.257029e+05\n",
       "13   4336.385128  3206.479529  1129.905599  8.245730e+05\n",
       "14   4336.385128  3202.091729  1134.293399  8.234387e+05\n",
       "15   4336.385128  3197.686890  1138.698239  8.223000e+05\n",
       "16   4336.385128  3193.264945  1143.120184  8.211569e+05\n",
       "17   4336.385128  3188.825828  1147.559300  8.200093e+05\n",
       "18   4336.385128  3184.369473  1152.015656  8.188573e+05\n",
       "19   4336.385128  3179.895812  1156.489316  8.177008e+05\n",
       "20   4336.385128  3175.404778  1160.980350  8.165398e+05\n",
       "21   4336.385128  3170.896305  1165.488824  8.153743e+05\n",
       "22   4336.385128  3166.370323  1170.014805  8.142043e+05\n",
       "23   4336.385128  3161.826766  1174.558363  8.130298e+05\n",
       "24   4336.385128  3157.265564  1179.119564  8.118506e+05\n",
       "25   4336.385128  3152.686650  1183.698479  8.106669e+05\n",
       "26   4336.385128  3148.089954  1188.295174  8.094786e+05\n",
       "27   4336.385128  3143.475408  1192.909721  8.082857e+05\n",
       "28   4336.385128  3138.842942  1197.542187  8.070882e+05\n",
       "29   4336.385128  3134.192486  1202.192642  8.058860e+05\n",
       "..           ...          ...          ...           ...\n",
       "330  4336.385128   476.000969  3860.384159  1.187150e+05\n",
       "331  4336.385128   461.009811  3875.375317  1.148396e+05\n",
       "332  4336.385128   445.960437  3890.424692  1.109492e+05\n",
       "333  4336.385128   430.852621  3905.532507  1.070436e+05\n",
       "334  4336.385128   415.686136  3920.698992  1.031229e+05\n",
       "335  4336.385128   400.460755  3935.924373  9.918702e+04\n",
       "336  4336.385128   385.176249  3951.208879  9.523581e+04\n",
       "337  4336.385128   369.832388  3966.552741  9.126926e+04\n",
       "338  4336.385128   354.428941  3981.956187  8.728730e+04\n",
       "339  4336.385128   338.965678  3997.419450  8.328988e+04\n",
       "340  4336.385128   323.442366  4012.942762  7.927694e+04\n",
       "341  4336.385128   307.858772  4028.526357  7.524841e+04\n",
       "342  4336.385128   292.214661  4044.170467  7.120424e+04\n",
       "343  4336.385128   276.509799  4059.875329  6.714436e+04\n",
       "344  4336.385128   260.743950  4075.641179  6.306872e+04\n",
       "345  4336.385128   244.916876  4091.468252  5.897726e+04\n",
       "346  4336.385128   229.028341  4107.356787  5.486990e+04\n",
       "347  4336.385128   213.078106  4123.307022  5.074659e+04\n",
       "348  4336.385128   197.065930  4139.319198  4.660727e+04\n",
       "349  4336.385128   180.991574  4155.393554  4.245188e+04\n",
       "350  4336.385128   164.854796  4171.530333  3.828035e+04\n",
       "351  4336.385128   148.655353  4187.729775  3.409262e+04\n",
       "352  4336.385128   132.393002  4203.992126  2.988863e+04\n",
       "353  4336.385128   116.067500  4220.317629  2.566831e+04\n",
       "354  4336.385128    99.678599  4236.706529  2.143160e+04\n",
       "355  4336.385128    83.226056  4253.159073  1.717844e+04\n",
       "356  4336.385128    66.709621  4269.675507  1.290877e+04\n",
       "357  4336.385128    50.129048  4286.256080  8.622512e+03\n",
       "358  4336.385128    33.484087  4302.901041  4.319611e+03\n",
       "359  4336.385128    16.774488  4319.610640 -3.846890e-08\n",
       "\n",
       "[360 rows x 4 columns]"
      ]
     },
     "execution_count": 232,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.3"
  },
  "toc": {
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": "block",
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
